using net_work.Data.Enum.Appr;

namespace net_work.Data.Entity.Appr;

/// <summary>
/// 审批实例实体类
/// </summary>
public class ApprovalInstance : BaseEntity
{
    /// <summary>
    /// 审批实例编号
    /// </summary>
    public required string Code { get; set; } 
    
    /// <summary>
    /// 审批实例开始时间
    /// </summary>
    public DateTime? BeginTime { get; set; }

    /// <summary>
    /// 审批实例结束时间
    /// </summary>
    public DateTime? EndTime { get; set; }

    /// <summary>
    /// 审批实例状态
    /// </summary>
    public required InstanceStatus Status { get; set; }

    /// <summary>
    /// 流程ID（外键）
    /// </summary>
    public required long FlowId { get; set; }

    /// <summary>
    /// 当前所处流程节点ID（外键）
    /// </summary>
    public long? CurrentFlowNodeId { get; set; }

    /// <summary>
    /// 使用审批的业务ID（外键）
    /// </summary>
    public required long BusinessId { get; set; }
}